
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
    
    function f(x) {
        //alert(x.Items.Item[0].ItemAttributes.Title);
        for (i=0; i<3; i++) {
            $("#im"+i).attr("src", x.Items.Item[i].MediumImage.URL);
            url = "http://rcm.amazon.com/e/cm?t=oneseagetbotr-20&o=1&p=8&l=as1&asins=DB&ref=tf_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr";
            url = url.replace("DB", x.Items.Item[i].ASIN);
            $("#a"+i).attr("href", url);
            //alert(x.Items.Item[0].ItemAttributes.Title);
            title = x.Items.Item[i].ItemAttributes.Title;
            $("#a"+i).html(title);
        }
    }
    $('document').ready(function() { 
             url =           window.location.href;

             b = url.indexOf("q=");
             e = url.indexOf(b, "&");
             if (e<0) e=url.length;
             q= url.substring(b,e);
        var pm_url = 'http://oneq.elookinto.com/ec/samples/s.php?q='+q;
    
        $.ajax({
            url: pm_url,
            dataType: 'jsonp',
            jsonpCallback: 'f',
            jsonp: 'jsonp'
        });
    });
</script>
<style>
    TD {
        text-align: center;
        width: 240px;

    }
    a {
        font-weight: bold;
        text-decoration: none
    }
</style>
<table> <tr>
        <td  >
            <a id="a0" href="nn" target="_blank"> </a> <br/>
            <img id="im0" onclick=""/> 
        </td>
        <td  >
            <a id="a1" href="nn" target="_blank"> </a> <br/>
            <img id="im1" onclick=""/> 
        </td>
        <td  >
            <a id="a2" href="nn" target="_blank"> </a> <br/>
            <img id="im2" onclick=""/> 
        </td>
    </tr>
</table>